<html>
   <head>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="">
<h2 class="comptitle">Packet <i>NetwPkt</i></h2>
<b>File: <a href="base-messages-NetwPkt.msg.html">base/messages/NetwPkt.msg</a></b><br/>
<p>A basic network layer packet definition</p>
<p>subclass if you want to create your own network layer packet class</p>
<p>The basic network packet contains a destination and source network address.
Additionally a time to live (ttl) field can be defined in order to limit the
maximum number of hops the messge will travel. The sequence number is guranteed
to be unique for all packets generated by one host</p>
<p><b>Author:</b> Daniel Willkomm</p>
<h3 class="subtitle">Usage diagram:</h3>
<p>The following diagram shows usage relationships between types.
Unresolved types are missing from the diagram. Click <a href="full-msg-usage-diagram.html">here</a> to see the full picture.</p>
<img src="NetwPkt-usage.png" ismap="yes" usemap="#usage-diagram"/><map name="usage-diagram"><area shape="rect" id="node1" href="NetwPkt.html" title="Packet NetwPkt" alt="" coords="5,6,77,34">
</map>
<h3 class="subtitle">Inheritance diagram:</h3>
<p>The following diagram shows inheritance relationships for this type.
Unresolved types are missing from the diagram. Click <a href="full-msg-inheritance-diagram.html">here</a> to see the full picture.</p>
<img src="NetwPkt-inheritance.png" ismap="yes" usemap="#inheritance-diagram"/><map name="inheritance-diagram"><area shape="rect" id="node1" href="NetwPkt.html" title="Packet NetwPkt" alt="" coords="201,6,273,34">
<area shape="rect" id="node2" href="DummyRoutePkt.html" title="Message DummyRoutePkt" alt="" coords="5,83,128,111">
<area shape="rect" id="node4" href="ProbabilisticBroadcastPkt.html" title="Message ProbabilisticBroadcastPkt" alt="" coords="152,83,323,111">
<area shape="rect" id="node6" href="WiseRoutePkt.html" title="Message WiseRoutePkt" alt="" coords="347,83,453,111">
</map>
<h3 class="subtitle">Known subclasses:</h3>
<table>
<tr>
   <td>
      <a href="DummyRoutePkt.html">DummyRoutePkt</a>
      <i> (message)</i>
   </td>
   <td>
<i>(no description)</i>
   </td>
</tr>
<tr>
   <td>
      <a href="ProbabilisticBroadcastPkt.html">ProbabilisticBroadcastPkt</a>
      <i> (message)</i>
   </td>
   <td>
<i>(no description)</i>
   </td>
</tr>
<tr>
   <td>
      <a href="WiseRoutePkt.html">WiseRoutePkt</a>
      <i> (message)</i>
   </td>
   <td>
<i>(no description)</i>
   </td>
</tr>
</table>
<h3 class="subtitle">Fields:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
   </tr>
<tr class="local">
   <td width="150">seqNum</td>
   <td width="100">
      <i>
unsigned long</i>
   </td>
   <td>
<p>sequence number</p>
</td>
</tr>
<tr class="local">
   <td width="150">destAddr</td>
   <td width="100">
      <i>
int</i>
   </td>
   <td>
<p>destination address</p>
</td>
</tr>
<tr class="local">
   <td width="150">srcAddr</td>
   <td width="100">
      <i>
int</i>
   </td>
   <td>
<p>source address</p>
</td>
</tr>
<tr class="local">
   <td width="150">ttl</td>
   <td width="100">
      <i>
int</i>
   </td>
   <td>
<p>time to live field (IP)</p>
</td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #808080; font-style: italic; ">// A basic network layer packet definition
//
// subclass if you want to create your own network layer packet class
//
// The basic network packet contains a destination and source network address.
// Additionally a time to live (ttl) field can be defined in order to limit the
// maximum number of hops the messge will travel. The sequence number is guranteed
// to be unique for all packets generated by one host
//
// </span><span style="color: #000080; ">@author</span><span style="color: #808080; font-style: italic; "> Daniel Willkomm
</span><span style="color: #800000; font-weight: bold; ">packet</span><span style="color: #000000; "> </span><span style="color: #000000; ">NetwPkt</span><span style="color: #000000; ">
{
    </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">destAddr</span><span style="color: #000000; ">;        </span><span style="color: #808080; font-style: italic; ">// destination address
</span><span style="color: #000000; ">    </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">srcAddr</span><span style="color: #000000; ">;         </span><span style="color: #808080; font-style: italic; ">// source address
</span><span style="color: #000000; ">    </span><span style="color: #000080; font-weight: bold; ">int</span><span style="color: #000000; "> </span><span style="color: #000000; ">ttl</span><span style="color: #000000; "> = </span><span style="color: #008000; ">1</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// time to live field (IP)
</span><span style="color: #000000; ">    </span><span style="color: #000080; font-weight: bold; ">unsigned</span><span style="color: #000000; "> </span><span style="color: #000080; font-weight: bold; ">long</span><span style="color: #000000; "> </span><span style="color: #000000; ">seqNum</span><span style="color: #000000; "> = </span><span style="color: #008000; ">0</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// sequence number
</span><span style="color: #000000; ">}

</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
